//
//  SYStatusBottomView.swift
//  SingWeibo
//
//  Created by shiying on 15/12/21.
//  Copyright © 2015年 shiying. All rights reserved.
//

import UIKit

class SYStatusBottomView: UIView {

    override init(frame: CGRect) {
        
        super.init(frame: frame)
        backgroundColor = UIColor(white: 0.9, alpha: 1)
        prepareUI()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func prepareUI() {
        self.addSubview(retweetButton)
        self.addSubview(firstLine)
        self.addSubview(commentButton)
        self.addSubview(secondLine)
        self.addSubview(unlikeButton)
        
        /// 约束
        self.ff_HorizontalTile([retweetButton, commentButton, unlikeButton], insets: UIEdgeInsetsZero)
        
        /// 分割线的约束 一
        firstLine.ff_AlignHorizontal(type: ff_AlignType.CenterRight, referView: retweetButton, size: nil)
        
        /// 分割线的约束 二
        secondLine.ff_AlignHorizontal(type: ff_AlignType.CenterRight, referView: commentButton, size: nil)
    }
    
    
    //MARK: - 属性
    /// 转发
    lazy var retweetButton = UIButton(imageName: "timeline_icon_retweet", title: "转发", fontSize: 11)
    /// 赞
    lazy var unlikeButton = UIButton(imageName: "timeline_icon_like", title: "赞", fontSize: 11)
    /// 评论
    lazy var commentButton = UIButton(imageName: "timeline_icon_comment", title: "评论", fontSize: 11)
    
    /// 分割线
    lazy var firstLine = UIImageView(image: UIImage(named: "timeline_card_bottom_line_highlighted"))
    lazy var secondLine = UIImageView(image: UIImage(named: "timeline_card_bottom_line_highlighted"))
    
}
